const Home = httpVueLoader('./views/main.vue')
const Desktop = httpVueLoader('./views/desktop.vue')
const Serialport = httpVueLoader('./views/serialport/index.vue')
const Wave = httpVueLoader('./views/wave/index.vue')
const routes = [{ 
    path: '/', 
    component: Home,
    children:[{
      path: '/', 
      component: Desktop,
      children:[{
        name:"serialport",
        path: '/serialport', 
        component: Serialport,
        meta: { 
          name: "串口工具"
        }
      },{
        name:"wave",
        path: '/wave', 
        component: Wave,
        meta: { 
          name: "波形分析"
        }
      }]
    },{
      path:"*",
      redirect: '/'
    }]
  }
]
const router = new VueRouter({
  mode: 'hash',
  routes 
})

module.exports = router